AMOTION_EVENT_ACTION_MASK

Motion event actions

Values

ValueMeaning
AMOTION_EVENT_ACTION_MASK0xff

Bit mask of the parts of the action code that are the action itself.

AMOTION_EVENT_ACTION_POINTER_INDEX_MASK0xff00

Bits in the action code that represent a pointer index, used with AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP. Shifting down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer index where the data for the pointer going up or down can be found.

AMOTION_EVENT_ACTION_DOWN0

A pressed gesture has started, the motion contains the initial starting location.

AMOTION_EVENT_ACTION_UP1

A pressed gesture has finished, the motion contains the final release location as well as any intermediate points since the last down or move event.

AMOTION_EVENT_ACTION_MOVE2

A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and AMOTION_EVENT_ACTION_UP). The motion contains the most recent point, as well as any intermediate points since the last down or move event.

AMOTION_EVENT_ACTION_CANCEL3

The current gesture has been aborted. You will not receive any more points in it. You should treat this as an up event, but not perform any action that you normally would.

AMOTION_EVENT_ACTION_OUTSIDE4

A movement has happened outside of the normal bounds of the UI element. This does not provide a full gesture, but only the initial location of the movement/touch.

AMOTION_EVENT_ACTION_POINTER_DOWN5

A non-primary pointer has gone down. The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.

AMOTION_EVENT_ACTION_POINTER_UP6

A non-primary pointer has gone up. The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.

AMOTION_EVENT_ACTION_HOVER_MOVE7

A change happened but the pointer is not down (unlike AMOTION_EVENT_ACTION_MOVE). The motion contains the most recent point, as well as any intermediate points since the last hover move event.

AMOTION_EVENT_ACTION_SCROLL8

The motion event contains relative vertical and/or horizontal scroll offsets. Use getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL and AMOTION_EVENT_AXIS_HSCROLL. The pointer may or may not be down when this event is dispatched. This action is always delivered to the winder under the pointer, which may not be the window currently touched.

AMOTION_EVENT_ACTION_HOVER_ENTER9

The pointer is not down but has entered the boundaries of a window or view.

AMOTION_EVENT_ACTION_HOVER_EXIT10

The pointer is not down but has exited the boundaries of a window or view.

AMOTION_EVENT_ACTION_BUTTON_PRESS11
AMOTION_EVENT_ACTION_BUTTON_RELEASE12

Meta